package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 采购车实体类
 */
@TableName("t_buycart")
@ApiModel(value = "购物车实体类", description = "封装购物车相关属性")
public class BuyCartBean {
    /**
     * 购物车id
     */
    @TableId(value = "pk_buyCartId", type = IdType.AUTO)
    @ApiModelProperty("编号")
    private Integer buyCartId;
    /**
     * 采购价
     */
    @TableField("b_buyPrice")
    @ApiModelProperty("采购价")
    private Integer buyPrice;
    /**
     * 采购数量
     */
    @TableField("b_buyNum")
    @ApiModelProperty("采购数量")
    private Integer buyNum;
    /**
     * 库存商品id
     */
    @TableField("fk_productId")
    @ApiModelProperty("库存商品id")
    private String productId;
    /**
     * 采购员id
     */
    @TableField("fk_userId")
    @ApiModelProperty("采购员id")
    private Integer userId;
    /**
     * 库存商品
     */
    @TableField(exist = false)
    @ApiModelProperty("库存商品")
    private ProductBean product;
    /**
     * 采购员
     */
    @TableField(exist = false)
    @ApiModelProperty("采购员")
    private UserBean user;

    public BuyCartBean() {
    }

    public BuyCartBean(Integer buyPrice, Integer buyNum, String productId, Integer userId) {
        this.buyPrice = buyPrice;
        this.buyNum = buyNum;
        this.productId = productId;
        this.userId = userId;
    }

    public Integer getBuyCartId() {
        return buyCartId;
    }

    public void setBuyCartId(Integer buyCartId) {
        this.buyCartId = buyCartId;
    }

    public Integer getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(Integer buyPrice) {
        this.buyPrice = buyPrice;
    }

    public Integer getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(Integer buyNum) {
        this.buyNum = buyNum;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }


    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    @Override
    public String toString() {
        return "BuyCartBean{" +
                "buyCartId=" + buyCartId +
                ", buyPrice=" + buyPrice +
                ", buyNum=" + buyNum +
                ", productId='" + productId + '\'' +
                ", userId=" + userId +
                ", product=" + product +
                ", user=" + user +
                '}' + "\n";
    }
}
